gaganfandomcom-20200214-history
N body Simulation
N Body Simulation of Spherically Symmetric Distribution Dark Matter Particles Project Title and Purpose The N Body Simulations are computer simulations that trace the positions of 'n' number of particles or bodies over a period of time. The positions are predicted by calculating the forces acting on each particle and thereby calculating the acceleration, velocity, position at each time. These can be very useful tools as they enable us to predict behaviors and also test theories/models. There are, however, limitations to such these simulations. Since most forces are determined pairwise, for $ n $ number of particles, the number of forces to be calculated are $ n(n-1) $. So, if we are observing, say, $ n $ particles, an addition of $ 1 $ particle will increase the number of forces to be considered from $ n(n-1) $ to $ n(n+1) $. This is an increase of $ 2n $ number of forces. Thus, the number of forces to be calculated at every time increases steeply. This leads to the limitations of the computation power of the system. Thus, for a large number of particles, we need a huge amount of computability. So, faster computers need to be developed. Another way of tackling the problem of large number of forces to be calculated is by mathematical approximations. Various types of approximations are used by cosmologists. Each type of approximation brings a different level of uncertainty and error in the obtained result. Good approximations are those that bring a lower uncertainty and a lower error. Spherically Symmetric Distributions My project deals with the case in which the distribution of particles is spherically symmetric. in such a case, there is only one degree of freedom for the particles, namely the radius. The Simulation The Initial Conditions The simulation begins with some initial condition and the computation takes over after that. the choice of the initial conditions determines the course of the simulation. These conditions are: * The initial position of the particles * The initial velocities of the particles Initial relation between the position and the velocity of each particle may be taken to be the Hubble's Law: v = Hr The calculation of the r is described in the section 'Radius of the Shell'. the calculation of the Hubble's constant $ H $ is described in the section 'Hubble's Constant' Radius of the Shell The Shells in this simulations are taken to be of unit mass. Therefore, the mass enclosed between the inner and the outer radii of the shells must be $ 1 $. This can be achieved by deciding the formulae based on this formula. The outer radius of the $ i^{th} $ shell is given by: i = \frac{4}{3}\Pi r^{3}_{i} \rho \Rightarrow r_{i} = \left( {\frac{3i}{4\Pi\rho}}\right) ^{\frac{1}{3}} In some cases, there is a mass $ M $ situated at the centre of the shells. This mass in not a part of any shell. In such a case, the equations become: M + i = \frac{4}{3}\Pi r^{3}_{i} \rho \Rightarrow r_{i} = \left( {\frac{3\left(M + i\right)}{4\Pi\rho}}\right) ^{\frac{1}{3}} Hubble's Constant \section{Forces} In case of the Dark Matter, the only force affecting the particles is the force of Gravity. The force of gravity between two particles is given by the formula: \begin{equation} F = \frac{Gm_{1}m_{2}}{r^{2}} \end{equation} The force of gravity acting on a shell of mass $ m $ and radius $ r $ due to an enclosed mass $ M $ is: \begin{equation} F = \frac{GMm}{r^{2}} \end{equation} \section{Energy} The Energy of a particle of mass $ m_{1} $ and moving at a velocity $ v $ attracted gravitationally by another particles of mass $ m_{2} $ at a distance $ r $ from the first particle is given by the formula: \begin{equation} E = \frac{1}{2}mv^{2} - \frac{Gm_{1}m_{2}}{r} \end{equation} The Energy of a spherical shell of mass $ m $, radius $ r $, expanding with a velocity $ v $ and enclosing a mass $ M $ is: \begin{equation} E = \frac{1}{2}mv^{2} - \frac{GMm}{r} \end{equation} \section{Analytical Solution} The analytical solution for a shell comes out to be: \subsection{For Energy $ = 0 $} In this case, the total energy of the shell of gas is equal to $ 0 $. This means that the Kinetic Energy is exactly equal to the mod of the Gravitaional Potential Energy. In such a condition, this equation stands: \begin{equation} \frac{1}{2}v^{2}_{i} = \frac{G\left(M + i\right)}{r_{i}} \end{equation} This leads us to a relation: \begin{equation} \frac{r_{i}\left(t\right)}{r_{i}\left(t_{0}\right)} = \left({\frac{t}{t_{0}}}\right)^{\frac{2}{3}} \end{equation} \subsection{For Energy $ < 0 $} This is the case where the total energy of the shell of gas is less than $ 0 $. This means that the Kinetic Energy is less than the mod of the Gravitaional Potential Energy. In such a condition, the energy requirement for expanding outwards indefinately is not met: \begin{equation} \frac{1}{2}v^{2}_{i} < \frac{G\left(M + i)\right)}{r_{i}} \end{equation} Thus, the shell expands for some time before collapsing again: \begin{equation} r_{i} \left( \theta \right) = \frac{r_{max}}{2} \left( 1 - \cos \left( \theta \right) \right) \end{equation} where $ r_{max} $ is given by: \begin{equation} r_{max} = \frac{GM}{ \vert E \vert } \end{equation} and the $ t \left( \theta \right) $ is given by: \begin{equation} t \left( \theta \right) = \frac{GM}{ {\left( 2 \vert E \vert \right) }^{\frac {3}{2}} } \left( \theta - \sin \left( \theta \right) \right) \end{equation} \subsection{For Energy $ > 0 $} and finally, this is the case where the total energy of the shell of gas is greater than $ 0 $. This means that the Kinetic Energy is more than the mod of the Gravitaional Potential Energy. In such a condition, the energy requirement for expanding outwards indefinately is met with some energy to spare. This excess energy speeds up the expansion to extremely high velocities: \begin{equation} \frac{1}{2}v^{2}_{i} > \frac{G\left(M + i)\right)}{r_{i}} \end{equation} Thus, the shell expands indefinately: \begin{equation} r_{i} \left( \theta \right) = \frac{GM}{ 2 \vert E \vert } \left( \cosh \left( \theta \right) - 1 \right) \end{equation} and the $ t \left( \theta \right) $ is given by: \begin{equation} t \left( \theta \right) = \frac{GM}{ {\left( 2 \vert E \vert \right) }^{\frac {3}{2}} } \left( \sinh \left( \theta \right) - \theta \right) \end{equation} \section{The Code} \end{document}